#!/usr/bin/env python
# -*- coding: utf-8 -*-


from selenium import webdriver

# chromedriver的绝对路径
driver_path = r'E:\02project\Pycharm230204\pythonProject\chromedriver-win64\chromedriver.exe'

# 初始化一个driver，并且指定chromedriver的路径
driver = webdriver.Chrome(executable_path=driver_path)
# 请求网页
driver.get("https://www.baidu.com/")
# 通过page_source获取网页源代码
print(driver.page_source)
